Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

Version 1 (modified by sadrul, 17 years ago) (diff)

--

Development FAQ

Accounts

I created an account. But it's not being saved.

You need to use purple_accounts_add to add the account to the list of available accounts. This list of accounts is saved. Note that many of the functions require an account to be on that list. So you should always call purple_accounts_add after creating an account.

How do I get online with an account?

There are two ways you can do this:

  • If you have other accounts online, and you want the new account to have the same status as those, then call purple_savedstatus_get_current to get the current status, and use gaim_savedstatus_activate_for_account for the account.
  • Otherwise, you can simply do purple_account_set_status to set the status of the account.

An account needs to be enabled before it can be connected. So after doing either of the above, you need to enable the account by calling purple_account_set_enabled.

Conversations

How can I create a conversation with someone?

Use purple_conversation_new. Use PURPLE_CONV_TYPE_IM if the conversation is an IM (one-to-one person conversation), and use PURPLE_CONV_TYPE_CHAT if it's a multi-user conversation.

How can I send a message in a conversation?

Use either purple_conv_im_send or purple_conv_chat_send. Note that the first parameter to either of these functions are *not* the conversation itself. Rather, it's the im-data/chat-data of the conversation which you can get from PURPLE_CONV_IM/PURPLE_CONV_CHAT.

Is there a way that I can print something in the conversation window, but not send the message?

Yes. Use purple_conv_im_write/purple_conv_chat_write.

All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!